<?php
class chitietthuedb{
	public function Them($MaThue, $NgayThue, $NgayTra, $MaPhong, $MaKH){
		$data = new dataservice;
		$sql = "INSERT INTO `chitietthuephong`(`MaThue`, `NgayThue`, `NgayTra`, `MaPhong`, `MaKH`)"
			+"VALUES($MaThue, $NgayThue, $NgayTra, $MaPhong, $MaKH)";
		return $data->ExecuteNoneQuery($sql);
	}
	
	public function Xoa($MaThue){
		$data = new dataservice;
		$sql = "DELETE FROM `chitietthuephong` WHERE MaThue = $MaThue";
		return $data->ExecuteNoneQuery($sql);
	}
	
	public function CapNhat($MaThue, $NgayTra){
		$data = new dataservice;
		$sql = "UPDATE `chitietthuephong` SET MaThue=$MaThue WHERE MaThue=$MaThue";
		return $data->ExecuteNoneQuery($sql);
	}
	
	public function LayDanhSach(){
		$data = new dataservice;
		$sql = "SELECT * FROM `chitietthuephong` WHERE 1";
		return $data->ExecuteQuery($sql);
	}
}
?>